Quarantine: Java Heap Protection in the Presence of Native Code

نویسندگان

  • Du Li
  • Witawas Srisa-an
چکیده

By using Java Native Interface (JNI), programmers can integrate Java programs with legacy systems or third-party libraries written in other languages (e.g., C, C++, and Pascal). However, the use of JNI may violate Java type safety feature because these native programs are not type-safe. As a result, such integration can cause memory errors that can be difficult to isolate. In this paper, we propose Quarantine, a runtime system that preserves memory safety of Java objects in spite of integration with native code. The goal of Quarantine is ensuring that no native threads can directly access objects in the Java heap. We provide a formal proof that our technique can achieve this goal. We then implement a prototype of Quarantine in the OpenJDK 1.7 running in interpreter mode. To evaluate the feasibility of our prototype, we conduct experiments to measure the runtime overhead of Quarantine. Because our current implementation is unoptimized, the overhead can be as high as 42%. We then discuss ways to reduce this overhead and perform a case study of using Quarantine to avoid heap corruption due to out-of-bound writes.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Jaguar: enabling efficient communication and I/O in Java

Implementing efficient communication and I/O mechanisms in Java requires both fast access to lowlevel system resources (such as network and raw disk interfaces) and direct manipulation of memory regions external to the Java heap (such as communication and I/O buffers). Java native methods are too expensive to perform these operations and raise serious protection concerns. We present Jaguar, a n...

متن کامل

Extending Camelot with Mutable State and Concurrency

Camelot is a resource-bounded functional programming language which compiles to Java byte code to run on the Java Virtual Machine. We extend Camelot to include language support for Camelot-level threads which are compiled to native Java threads. We extend the existing Camelot resource-bounded type system to provide safety guarantees about the heap usage of Camelot threads.

متن کامل

Implementation techniques for a multi-service Java Virtual Machine

This report describes the design and implementation work which has been undertaken using the Java Virtual Machine (JVM) over the Nemesis operating system. The aim is to provide a Java runtime system which is able to support a diverse mix of traditional and soft-real-time applications, just as the Nemesis operating system aims to provide this support to native applications. The report covers thr...

متن کامل

Two-factor Protection Scheme in Securing the Source Code of Android Applications

While Android has become most popular OS in mobile phone market, more and more Android app developers are suffering from intellectual property infringement because it’s easy to extract the assets stored in the Android apps and to decompile Android apps to Java source code. This issue also poses threats to users’ privacy. In this article we reviewed the existing protection approaches for the pro...

متن کامل

Safe and Efficient Hardware Specialization of Java Applications

Providing Java applications with access to low-level system resources, including fast network and I/O interfaces, requires functionality not provided by the Java Virtual Machine instruction set. Currently, Java applications obtain this functionality by executing code written in a lower-level language, such as C, through a native method interface. However, the overhead of this interface can be v...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016